package com.skycity.auth;

import cn.skycity.framework.core.config.FeignConfiguration;
import com.skycity.framework.uaa.api.UserFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;

@SpringBootApplication(scanBasePackages = {"com.skycity.auth", "cn.skycity.framework.core"})
@EnableMethodSecurity
@EnableFeignClients(defaultConfiguration = FeignConfiguration.class, basePackages = "com.skycity.framework.uaa")
@Slf4j
public class SkycityAuthApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(SkycityAuthApplication.class, args);
        UserFeignClient bean = run.getBean(UserFeignClient.class);
        log.info("UserFeignClient: {}", bean);
    }

}
